<%--
 *  Copyright (C) 2000 - 2003 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  String strModuleName = "COM";
  String privilegeCode = "A02";
  String contextPath = request.getContextPath();
  HashMap userinfos = (HashMap)session.getAttribute("userinfo");
%>
<%@ include file="/inc/CommonHeader.inc" %>
<html>
<head>
<title>DataUpload</title>
<PageFlow:CheckPageFlow pageName="p_zyldatauploadbottom"/>
<%@ include file="/inc/CatchError.inc" %>
<link rel="stylesheet" href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath%>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/FuncLib.js"></script>
<script type="text/javascript" src="ZopSaleOrderNew.js"></script>
<script language="JavaScript">

function page_submit()
{
  counts = cform.counts.value;
  if(Number(counts)>0){
	 if(!confirm("此期间内您已上载过数据，是否仍继续执行上载？"))return;
  }
  cform.actionname.value = "submit";
  cform.target = "_parent";
  isRunning = true;
  cform.submit();
}

function page_getCounts(){
	userid = '<%=(Integer)userinfos.get("userid")%>';
	var  datahandler = new  DataHandler();
	datahandler.add_params("userid" , userid, 'Integer');
	datahandler.getResultFromHashMap("onehash","counts","document.cform.counts");
	datahandler.add_job("j_getuploadcounts");
	datahandler.runDataHandler();
	setTimeout("page_submit();","250");
 }

function page_del()
{
  if(!confirm("重新上载将清空已上载的临时数据，是否确认？")) return;
  cform.actionname.value = "delete";
  cform.target = "_parent";
  isRunning = true;
  cform.submit();
}

</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<span style="display:none">
<form name="cform" method="post" action="<%=contextPath%>/Dispatcher" >
  <input type="hidden" name="pagename" value="p_zyldatauploadbottom">
  <input type="hidden" name="actionname">
  <input type="hidden" name="counts">
</form>
</span>
<iframe id="dataLoaderIframe" style="display:none;z-index:5000"></iframe>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tr>
        <td>
        <center>
            <a onclick="page_getCounts()"><input type=button class="button1" value="提交" style="width:60"></a>   
            <a onclick="page_del()"><input type=button class="button1" value="重新上载" style="width:60"></a>     
        </center>
        </td>
    </tr>
</table>
</body>
</html>